import 'package:flutter/services.dart';

import '../util/LoggerUtil.dart';

class MicrophoneController {

  static const MethodChannel _channel = MethodChannel('ldh.im.im_app/microphone');
  static final _LOGGER = createLogger();

  static Future<void> turnOffMicrophone() async {
    try {
      await _channel.invokeMethod('turnOffMicrophone');
    } on PlatformException catch (e) {
      _LOGGER.i("Failed to turn off microphone: '${e.message}'.");
    }
  }
}